// /scm/contract/page
import request from '@/utils/request'

export function contract(data) {
  return request({
    url: '/scm/contract/getSupplierContractListBySypplierId',
    method: 'get',
    params: data
  })
}
export function add(data) {
  return request({
    url: '/scm/contract',
    method: 'post',
    data
  })
}
export function update(data) {
  return request({
    url: '/scm/contract',
    method: 'put',
    data
  })
}
export function uploadFile(id, data) {
  return request({
    url: `/scm/contract/uploadFile/${id}`,
    method: 'post',
    data
  })
}

export function download(id) {
  return request({
    url: `/scm/contract/downloadFile/${id}`,
    method: 'get',
    responseType: 'arraybuffer'
  })
}
export function contractListPage(data) {
  return request({
    url: '/scm/contract/page',
    method: 'get',
    params: data
  })
}
export function sendEmail(data) {
  return request({
    url: '/scm/contract/sendEmail',
    method: 'post',
    data
  })
}
export function getinfor(data) {
  return request({
    url: '/supplier/page',
    method: 'get',
    params: data
  })
}
export function downLoaddata(data) {
  return request({
    url: `/scm/contract/doExport`,
    method: 'get',
    responseType: 'arraybuffer',
    params: data
  })
}
